Assessing the drivers of gut microbiome composition in wild redfronted lemurs via longitudinal metacommunity analysis

The gut microbiome influences host’s immunity, development, and metabolism and participates in the gut–brain axis, thus impacting the health of the host. It is a dynamic community varying between individuals and within individuals at different time points. Hence, determining the factors causing this variability may elucidate their impact on host’s health. However, understanding the drivers of variation has proven difficult particularly as multiple interactions occur simultaneously in the gut microbiome. We investigated the factors shaping the gut microbiome by applying the metacommunity concept where the gut microbiome is considered as a microbial community shaped by the interactions within the community, with the host and microbial communities outside the host, this through a longitudinal study in a wild primate. Focal behavioral data were collected for 1 year in four groups of redfronted lemurs to determine individual social and feeding behaviors. In addition, regular fecal samples were collected to assess bacteria, protozoa, and helminths through marker gene analysis and to measure fecal glucocorticoid metabolite (fGCM) concentrations to investigate the impact of physiological stress on the gut microbiome. Higher consumption of leaves and elevated fGCM concentrations correlated with higher alpha diversity, which also differed among groups. The major drivers of variation in beta diversity were group membership, precipitation and fGCM concentrations. We found positive and negative associations between bacterial genera and almost all studied factors. Correlations between bacterial indicator networks and social networks indicate transmission of bacteria between interacting individuals. We detected that processes occurring inside the gut environment are shaping the gut microbiome. Host associated factors such as, HPA axis, dietary changes, and fluctuations in water availability had a greater impact than interactions within the microbial community. The interplay with microbial communities outside the host also shape the gut microbiome through the exchange of bacteria through social relationships between individuals and the acquisition of microorganisms from environmental water sources.

www.nature.com/scientificreports/ The gut microbiome are the prokaryotic and eukaryotic communities inhabiting the host's gastrointestinal tract playing a pivotal role in the health of the host 1-3 . This community is dynamic, varying between individuals, and within an individual at different time points 4,5 . Hence, identifying the drivers of gut microbiome variability will help to understand how its fluctuations may associate with health outcomes 5,6 . However, detecting these drivers has proven difficult as few studies recognize the gut microbiome as an ecological system 7 . Furthermore, longitudinal studies capturing the dynamics of the gut microbiome are rare or based on only few individuals resulting in limited data 5 . The metacommunity concept recognizes the gut microbiome as an ecological system in which multiple interactions occur simultaneously, thereby providing a framework for determining its drivers 6,7 . The metacommunity concept states that the local community assemblage is shaped by several processes, including factors shaping the niche, in this case the gut system, and the interaction with other microbial communities outside the host through dispersal of microorganisms [7][8][9] . Here, we investigated the drivers of the gut microbiome in a wild primate longitudinally by applying metacommunity concepts by addressing the impact of the interactions with microbial communities outside the host and environmental selection in the gut niche. Thus, considering it as a changing ecosystem shaped by factors inside and outside the host simultaneously.
In gut microbiome research, dispersal processes of the microorganisms between hosts and the environment can be assessed through social interactions and habitat sharing 5,10 . Group membership in wild non-human primates and cohabitation in humans are predictors of gut microbiome similarity [11][12][13][14][15][16] . Furthermore, the host's social behaviors can also predict gut microbiome similarity [17][18][19][20] . Environmental selection for gut communities occurs in the intestinal niche through feedbacks between the host and the microorganisms and amongst microorganisms 6,7 . Host-associated factors such as, age, sex, and physiological stress, i.e., hypothalamic-pituitary-adrenal (HPA) axis activation, may influence immunity and intestinal physiology altering the gut microbiome 1,2,21 . Furthermore, shifts in the host's diet impact gut bacterial communities as they alter nutrient availability [22][23][24][25] . Gut inhabitants interact between themselves through trophic chains, predation, and competition for resources 3,26 . For instance, in non-human primates, higher bacterial alpha diversity correlates to higher eukaryotic diversity 27 . Therefore, the presence of helminths and/or protozoa may impact the abundances of bacterial taxa [28][29][30] . Despite being challenging, research on wild animals provide an exceptional possibility to apply metacommunity concepts for investigating the drivers of the gut microbiome in undisturbed scenarios 5,8 .
We examined the drivers of the gut microbiome by applying metacommunity concepts in a longitudinal setup in wild redfronted lemurs in Kirindy Forest, Madagascar. These lemurs live in small multifemale-multimale groups consisting of individuals of different ages allowing to estimate the potential impact of sex and age 31,32 . Kirindy Forest is a highly seasonal environment with a cold dry season with almost no precipitation (April-October) and a short warm rainy season (November-March) 33 . These seasonal changes affect food availability, meaning redfronted lemurs must shift their diets 25,34 . Moreover, fluctuations in precipitation reduce the availability of drinking water 35,36 . HPA axis activation due to exposure to stressors has been previously investigated in these redfronted lemurs through standardized measurement of fecal glucocorticoid metabolites (fGCM) [37][38][39] . For instance, during the dry season and in periods of social instability such as the mating (May-June) and the birth (September-October) season individuals have higher fGCM concentrations indicating the activation of their HPA axis 38,40,41 . Furthermore, these lemurs harbor diverse protozoa and helminths in their guts, which can be assessed through marker gene analysis to investigate microbe-microbe interactions 25,42,43 . Finally, behavioral observations of wild primates provide the opportunity to estimate the effects of direct and indirect social contacts in dispersal processes of microbes within a group 10 . Particularly, in redfronted lemurs that perform auto-and allogrooming with a buccal structure, i.e., the toothcomb 44 . Oral grooming may increase the possibility of up taking microorganisms from their own fur and the fur from other individuals in comparison to manual grooming which is exhibited in anthropoid primates 37 . Altogether, these lemurs provide a unique possibility to study some of the multiple drivers of the gut microbiome in a wildlife setting.
We investigated (a) the interactions between the host and the microorganisms, (b) the interplay between gut prokaryotes and eukaryotes and (c) dispersal processes of bacteria within and between groups and the environment as drivers of the gut microbiome in a longitudinal study using a dense sampling regime. Focal behavioral data and monthly fecal samples (N = 799) were collected during 1 year from all individuals (N = 35) belonging to four groups. Bacteria, protozoa, and helminths were identified with marker gene analysis and fGCM measurements were performed to determine HPA axis activation. Furthermore, precipitation was measured as a proxy for changes in available water sources. We hypothesized that (1) host intrinsic factors such as sex, age, and fGCM concentrations as well as extrinsic factors such as precipitation, and diet impact gut microbiome composition and diversity. We anticipate that increased levels of fGCM, lower age and higher precipitation correlate with lower alpha diversity, while higher consumption of leaves correlates with higher alpha diversity 22,23,25,45 . No impact of sex is expected to be detected 15 . (2) Protist and helminth richness are predicted to correlate with changes in bacterial diversity and composition, but no associations with particular bacteria are predicted as these are parasite species specific 3,26,28,29 . (3) The gut microbiome composition and beta diversity, but not alpha diversity, are foreseen to differ among groups and a higher diversity of social interactions is predicted to correlate positively with alpha diversity [12][13][14][15][16] . (4) Bacterial indicator networks of amplicon sequence variants (ASVs) correlate with social networks indicating bacterial transmission through social interactions.

Methods
Sample, behavioral, and environmental data collection. This Table S1). 641 of these samples were splitted and 0.5-1.0 g of feces were placed in 5 mL of 80% ethanol for measuring fGCM concentrations using validated methodologies (see below). Behavioral data was collected by continuous focal observations for 30 min in the morning (7:30-11:00) and afternoon (14:00-17:00). Feeding behaviors were recorded by protocolling the duration and the ingested food item (leaves, flowers, or fruits). For social interactions, we protocolled the duration of grooming and body contact, and the interacting partners. Fecal samples and behavioral data were collected in a randomized but counter-balanced order. Precipitation was collected with a Tropos data logger (Lambrecht meteo, Göttingen, Germany) and we calculated the mean precipitation 30 days prior to sample collection according to previous publications 22 .  Bioinformatic processing of amplicon data. Paired-end reads were quality-filtered with fastp v0.20.0 using default settings plus an increased per base phred score of 20, base pair corrections by overlap (-c), as well as 5′-and 3′-end read-trimming with a sliding window of 4, a mean quality of 20 and minimum sequence length of 50 bp. Quality-controlled reads were merged with PEAR v0.9.11 and primer-clipping was performed with Cutadapt v2.5 with default settings. VSEARCH 2.14.1 was used for size-sorting, size-filtering (16S rRNA ≥ 300 bp; 18S rRNA ≥ 250 bp) and dereplication. The sequences were denoised with UNOISE3 using default settings and chimeras were removed with UCHIME3 (de novo followed by reference-based) leading to the final set of amplicon sequence variants (ASVs). 16S rRNA were mapped against the ASVs and taxonomy was assigned with a minimum identity of 70% using BLAST 2.9.0 + against the SILVA SSU 138.1 NR 48 . Best hits were only accepted if coverage ≥ 90 and blastn hit identities were corrected to unclassified according to the thresholds proposed by 49 . 18S RNA reads were assigned using BLAST 2.9.0+ against the PR2 database 50 and taxonomy was determined with the Bayesian LCA-based Taxonomic Classification Method (BLCA) using a confidence score threshold of 0.80 51 . To control for spurious reads and index hopping, ASVs with < 0.25% reads were removed before analysis 52 . All sequencing statistics are in Supplementary Table S4.

Measurement of fecal glucocorticoid metabolites.
Glucocorticoid metabolites (fGCMs) were extracted from the fecal samples directly at the field site using a validated method 53 applied successfully in previous lemur studies 54,55 . Briefly, for fGCM extraction, tubes with the collected feces were vortexed for 2 min to homogenize the fecal matter within the 80% ethanol and the fecal suspension was centrifuged with a manually operated centrifuge (Hettich GmbH & Co. KG Tuttlingen, Germany) for 10 min. 1.5 mL of the extracts were collected into 2 mL polypropylene tubes and stored in the field at ambient temperature in the dark and at − 20 °C in Germany. To calculate the weight of each fecal sample collected, a differential weighting of the samples prior to and after the collection of the feces was undertaken. FGCM concentrations were determined using an enzyme immunoassay (EIA) for the analysis of immunoreactive 11-oxoetiocholanolone, a group-specific measurement of cortisol metabolites in primates 39 . The EIA, carried out as described in 38 , has been validated for tracking HPA axis activity in redfronted lemurs 37,38 . Inter-and intra-assay coefficients of variations (CVs) of high-and low- www.nature.com/scientificreports/ value quality controls were 10.9% (high, n = 52) and 9.7% (low, n = 52) and 6.8% (high, n = 17) and 8.2% (low, n = 17), respectively. FGCM values are expressed as mass per gram of wet fecal weight (ng/g).
Data analysis and statistics. Data visualization and statistical analysis were performed using R v4.1.0 and RStudio v1.4.1717 with ampvis2, ape, stringr, reshape2, viridis, data.table, tidyverse, and ggplot2. All data for alpha and beta diversity analysis of 16S rRNA data was rarefied to the lowest read counts whereas for barcharts, linecharts, and network estimation it was normalized using GMPR (Supplementary Table S4). Bacterial alpha diversity was calculated as Faith´s phylogenetic diversity (PD) with picante using a phylogenetic tree generated by aligning all sequences with MAFFT v7.407-1 at 100 iterations, calculated using FastTreeMP v2.1.7 and midpoint-rooted using FigTree v1.4.4.
Analysis of gut protozoa and helminth. Helminthic and protozoan gut communities were studied by amplifying the V4 region from the 18S rRNA gene. ASVs from previously reported gut protozoa and helminth were extracted from the 18S rRNA gene data to remove environmental contaminants. The analyzed taxa were Trichostomatia, Nematoda, Metamonada, Coccidiomorphea, and Cestoda 27,42,56 . Samples were merged per individual per month and parasite richness was estimated as the number of observed ASVs. A Jaccard matrix was calculated to investigate changes in parasite beta diversity and visualized with a Principal Coordinate Analysis (PCoA) in ampvis2. A PERMANOVA test to estimate beta diversity variation due to group, sex, age, and season was calculated with the adonis function from the vegan package using individual as strata to account for repeated sampling, 10,000 permutations and Benjamini-Hochberg FDR correction.
Testing the factors affecting bacterial alpha diversity. The effects of group, sex, age, social interactions, parasite richness, feeding on fruits, flower or leaves, and precipitation on PD were tested by fitting a Linear Mixed Model (LMM) with lme4. To achieve normally distributed and homogenous residuals PD was Box-Cox transformed (as a log transformation was not sufficient in this case). Test predictors were group, sex, age, social interactions, and parasite richness, whereas diet, and precipitation were control predictors. Age was log-transformed to achieve a more symmetrical distribution and to avoid influential cases, and all predictors were z-transformed to facilitate model convergence without affecting the shape of the distribution. Individual identity was included as random intercept effect and the random slopes for all fixed effects (except for group and sex) into individual identity were included to keep the type I error at the nominal level of 5% 57 . Correlations between random intercepts and random slopes were included. The significance of the test predictors was determined by calculating a null model excluding all test predictors and comparing it to the full model using a likelihood ratio test. The effects of single fixed effects were determined with the package lmerTest. Homogeneous and assumptions of normally distribution of residuals were checked visually with QQ-plots of residuals and plotted against fitted values revealing no obvious deviations. Calculation of Variance Inflation Factors using car was done on a model lacking all random effects and no issues of collinearity were detected (maximum:1.433). Model stability was determined by dropping predictors one at a time, fitting a full model from each of the subsets and comparing the estimates of these models to those obtained for the initial full model revealing it was acceptable. The same model was calculated for those samples having fGCM measurements by adding log-transformed fGCM values as a test predictor to avoid influential cases, as it was skewed otherwise. No collinearity was detected (maximum:1.404) and model stability was also acceptable.
Drivers of bacterial beta diversity dissimilarities. Weighted UniFrac matrices (WUnifrac) were calculated in ampvis2 and visualized with PCoA. To estimate the drivers of beta diversity variation, PERMANOVA tests were calculated with the adonis function from the vegan package using individual as strata to account for repeated sampling, by runnning 10,000 permutations and performing Benjamini-Hochberg FDR corrections. Three different datasets were tested: (a) diet and social interactions (n = 773), (b) parasite richness (n = 682) and c) fGCM levels (n = 547) as for some samples either behavioral or parasite data was missing and PERMANOVA cannot be calculated in samples with missing data points. Group, sex, age, and precipitation were tested in all datasets.
Associations between bacterial genera and all covariates. Associations of group, sex, age, social interactions, diet, precipitation and fGCM concentrations to bacterial genera were determined using the package MaAsLin2 58 . Two models with the random effect of individual were calculated: (a) all factors without fGCM levels (n = 799) and (b) all factors including fGCM concentrations (n = 641). ASV counts were centered-log ratio transformed and Benjamini-Hochberg FDR corrected p-values were reported.
Bacterial indicator and social network analysis. Bacterial indicator networks were calculated with indicspecies to identify correlations between ASVs abundances and individuals 59 . multipatt was used to determine the phi coefficient of association and the association strength between an ASV and an individual using 999 permutations. Networks were visualized in Cytoscape v3.8.2 using the individuals and their associated bacterial taxa as nodes, whereas edges represent those significant (p < 0.05) correlation coefficients between nodes. The networks had an edge-weighted spring embedded layout, taxon node size was adjusted according to taxa abundance, edge width represents association strength to target, and all nodes and edges were bundled. Undirected weighted social networks for each group were calculated using the Dyadic Sociality Index (DSI) 60
The highest concentrations of fGCM were detected in August for group A (571.9 ng/g ± 412.65), and in June in all other groups (B: 447.00 ng/g ± 373.13; F: 706.33 ng/g ± 177.87; J: 463.23 ng/g ± 337.29) (Fig. 1E). Consumption of leaves, fruits and flowers varied across months and between groups ( Supplementary Fig. S3A). December and January were the months with the highest precipitation ( Supplementary Fig. S3B).  Table S8) an effect of group membership, with group F having a lower alpha diversity compared to the other groups (p = 0.009, Fig. 2A) was detected. Additionally, feeding on leaves correlated positively with alpha diversity (p = 0.000, Fig. 2B). The second model for alpha diversity had a reduced dataset (see "Methods") including fGCM concentrations. Similarly, an effect of group membership for group F and feeding on leaves was detected (LMM: Estimate = 26.786, SE = 1.506, t-value = 17.782, full-null model comparison: p = 0.038; Supplementary Table S9). FGCM concentrations correlated positively with alpha diversity (p = 0.027, Fig. 2C) with higher fGCM concentration resulting in a higher alpha diversity. No effects of sex, age, social interaction diversity index, or parasite richness were detected.

Factors leading to dissimilarities between gut bacterial communities.
To estimate the drivers of variance on beta diversity, PERMANOVA based on WUnifrac matrices on three different datasets were calculated due to missing data points (see "Methods"). The factors tested in the first dataset explained 8.9% of the variance (Fig. 3A,B), with group (r 2 = 0.035, p < 0.000) and precipitation (r 2 = 0.021, p < 0.000) being the strongest predictors (Supplementary Table S10). In the second dataset (Supplementary Table S11) including the parasite data, the total variance explained was 10.4% with group (r 2 = 0.041, p < 0.000) and precipitation (r 2 = 0.024, p < 0.000) as strongest predictors. Finally, in the dataset including fGCM concentrations (Supplementary Table S12  www.nature.com/scientificreports/ of the variance was explained with fGCM (r 2 = 0.028, p < 0.000), group (r 2 = 0.052, p < 0.000) and precipitation (r 2 = 0.022, p < 0.000) as strongest predictors.

Associations of social interactions, parasite richness, fGCM concentrations, diet, and precipitation to bacterial genera composition.
A total of 50 bacterial genera were associated with group, social interaction diversity index, feeding on flowers, leaves or fruits, parasite richness, age, and precipitation in the full dataset ( Fig. 4A and Supplementary Table S13). Precipitation and diet had the most associated taxa, with 33 and 36 genera, respectively. Dispersal processes attributed to group membership and social interactions had 27 and 2 associated taxa, respectively. Parasite richness was associated with 12. In the subsetted dataset including fGCM concentrations, 50 genera associated with at least one of the studied covariates ( Fig. 4B and Supplementary Table S14). Twenty taxa associated with fGCM levels, whereas slight variations were detected for the other covariates: precipitation 26 , diet 24 , group 28 , social interactions 2 , and parasite richness 5 . In both datasets, no genus associations with sex and age were detected.

Correlation between social networks and bacteria indicator networks.
To determine if sharing of bacterial ASVs between individuals correlates to an individual's social network, bacterial indicator networks were calculated. These networks were determined based on ASVs to identify bacterial ASVs whose relative abundance significantly correlate within and between individuals and, hence, indicate microbe dispersal through social interactions. Correlations between bacterial indicator ASVs and social networks were detected for group A (r 2 = 0.536, p = 0.002, Supplementary Tables S15 and S16), and B (r 2 = 0.399, p = 0.013, Supplementary Tables S17 and S18), but not for group F (r 2 = 0.502, p = 0.089, Supplementary Tables S19 and S20) and J (r 2 = 0.235, p = 0.060, Supplementary Tables S21 and S22) (Fig. 5G,H). Furthermore, individuals who emigrated from groups: A (AAmoM; Fig. 5A,B), B (BTilM; Fig. 5C,D), and F (FGozM; Fig. 5E,F) had less strong social   Supplementary  Fig. S4. In group A, the two immigrating individuals, BTilM and AmoM, were more distant from others (Supplementary Fig. S4A). In addition, the bacterial communities of BAdoF and BTilM were more different in the last sampling month of residency in group B (Supplementary Fig. S4B). Finally, the bacterial community of the emigrating male FGoZM was clearly different from the rest of the group (Supplementary Fig. S4C).

Discussion
Our longitudinal study revealed that host-microbe interactions, the interplay between bacteria and parasite richness, and dispersal processes of bacteria through social relationships impact the fluctuations of the gut microbiome. From the investigated host-associated factors, the HPA axis measured through fGCM concentrations revealed the strongest impact. Higher fGCM levels correlated with higher alpha diversity and associated with changes in bacterial abundances. Conversely, no impact of age and sex was identified. Interactions between eukaryotes and bacteria were detected. Parasite richness explained only a small amount of variance in beta diversity but impacted both, positively and negatively, the abundances of specific bacterial genera. Dispersal processes of bacteria between hosts were estimated from social interactions and group membership. Group membership explained 3-5% of the variance in beta diversity, groups had different alpha diversity, and each group had its own associated bacterial genera. Diversity of social interactions explained only low variance in beta diversity but impacted the abundances of certain bacteria. In two of the four groups, an individual's social network correlated to sharing of significantly associated bacterial ASVs with other individuals, suggesting transmission of taxa through social interactions.
The HPA axis is an important driver of gut microbiome variation in wild lemurs. Higher fGCM concentrations, indicating HPA axis activation, correlated to increased bacterial alpha diversity. The highest mean fGCM values for three of the four groups were detected during June indicating an influence of the mating season on HPA axis activity 40,61 . However, for one group the highest fGCM values were recorded for August, a period when redfronted lemurs are exposed to environmental stressors due to reduced food and water availability 33,34,38 . Even though environmental stressors could have increased fGCM levels, we suspect that social stressors had a greater influence, as reported before in these lemurs 38 . Our longitudinal approach aiming to capture these periods when redfronted lemurs experience social and environmental challenges made it possible to detect this impact 33,34,38 . Studies in other species, in contrast, revealed no correlations or negative correlations between glucocorticoids and alpha diversity [62][63][64][65] . Increased fGCM levels may, however, result in higher bacterial alpha diversity due to the down regulation of the immune response controlling the gut microbiome by glucocorticoids, thus allowing the colonization by other taxa 66,67 . Consumption of leaves during the dry season www.nature.com/scientificreports/ also correlated with higher alpha diversity which may contribute to a certain degree to the positive correlation between fGCM concentrations and alpha diversity. However, redfronted lemurs fed more on leaves in September/October, whereas fGCM concentrations peaked in June/August, indicating that feeding on leaves and  www.nature.com/scientificreports/ fGCMs influence separately alpha diversity. In addition, fGCM concentrations was one of the covariates explaining most variation in beta diversity, indicating that fGCM concentrations drive differences in beta diversity. Positive associations were detected only with three genera from Rikenellaceae, Rhodospirillales and Clostridia.
Higher abundances in genera from Clostridia have been reported in mice exposed to social stressors and western lowland gorillas with high fGCM measurements 62,65 . Fourteen genera were impacted negatively by fGCM concentrations, including genera from Prevotellaceae, Spirochaetaceae and Sutterella, some of the most abundant taxa detected in redfronted lemurs 25 . Genera from Prevotellaceae are important for the digestion of plant polysaccharides 68 , while treponemes from non-human primates harbor genes for the digestion of sucrose and glycerophospholipids 69 .This suggests that HPA axis activation can impact bacteria providing relevant pathways for food digestion. Furthermore, a negative influence on the most abundant bacterial genera may also lead to an increase in alpha diversity due to changes on the gut community allowing other genera to thrive. A negative association to a genus from Helicobacteraceae, a potential pathogen, was also detected in yellow-legged gull 45 .
The activation of the HPA axis and its production of glucocorticoids can influence the gut microbiome through the increase of gut permeability allowing the translocation of bacteria from the lumen to other tissues 63 . Also, HPA axis activation can reduce immune activation and increase susceptibility to infections by pathogens 63,70,71 .
Our results indicate that social stressors from the mating season like reproductive competition and female evictions can activate the HPA axis impacting the gut microbiome 40,72 .
Diversity of gut protozoa and helminths impact the bacterial community. Helminths and protozoa were prevalent all year in almost all individuals, and the orders detected coincide with our previous study of redfronted lemurs 25 . Variations in eukaryotic communities between samples were explained by season. Our results support previous reports from redfronted lemurs that detected seasonal differences in the abundances of Chromadorea, and protozoa diversity 73 . Parasite richness only explained very low variation in bacterial beta diversity but associated positively and also negatively with certain bacterial taxa, supporting other studies from non-human primates [28][29][30] . Positive associations with Succinivibrio and Verrucomicrobiota have been reported in humans as well 74,75 . Helminthic intestinal infections can increase mucus production, thus influencing positively mucin utilizers, such as Verrucomicrobiota 23,76 . Also, negative associations of genera from Lachnospiraceae such as Syntrophococcus and XPB-1014 group, have been detected in humans with helminthic and helminthicprotozoan infections 74,75,77 . Lachnospiraceae are fiber metabolizers essential for the digestion of the lemur's diet, particularly during increased leaf consumption 78,79 . Other negatively associated taxa like Collinsella, Colidextribacter, Tannerellaceae and Erysipelotrichaceae are gut bacteria with no association to parasites reported so far [80][81][82] . Each parasite can have specific effects on the gut niche, thus explaining that parasite richness explains only a low amount of beta diversity since all parasites were investigated together 3,76,83 . Also, it was not possible to compare infected vs. uninfected individuals, as parasites were prevalent in almost all individuals all year. We investigated only presence and absence of parasites, as abundance estimations from 18S rRNA should be taken cautiously 43 . Parasites can impact bacteria positively or negatively through trophic chains, predation, competition, and immunomodulation 3,26,76 . These are all processes that could be occurring in redfronted lemurs due to their diverse eukaryotic communities, thus providing a unique study system for future investigations of transkingdom interactions.
Dispersal processes between hosts are drivers of gut microbiome community composition. Group membership, diversity of social interactions and social networks were used to estimate bacterial dispersal through social behaviors. Group membership was one of the covariates explaining the highest variance in beta diversity and having the most associated taxa, indicating that each group has a specific bacterial community despite fluctuations of the gut microbiome. Group differences in the gut microbiome can be due to sharing of microorganisms through social interactions between group members, as it has been proposed previously [12][13][14][15][16]84 . Differences in bacterial communities can also be explained by habitat use, but all studied groups have overlapping home ranges with at least one group 85 . However, group F, occupies a home range more distant to a river traversing the study area, which may affect the habitat quality and could explain the differences in alpha diversity 33,35,86 . Kinship may also influence group differences but not all group members were related thus, we suppose that it may have a lower impact 17,40 . Diversity of social interactions only explained very low variance in beta diversity, but it had negatively associated taxa. Succinivibrio, a starch degrader, was impacted negatively indicating that social interactions can impact genera carrying out relevant metabolic functions 87 .
Correlations between bacterial indicator ASVs and social networks indicate that at least some of these indicator taxa are shared through affiliative interactions. Hence, individuals exhibiting strong social relationships, share bacterial ASVs through their affiliative behaviors influencing bacterial presence and abundances. The fact that no correlations were detected for groups F and J indicate that this signal is harder to detect in groups with less differentiated social relationships. Less ASVs were shared by group members that emigrated or immigrated the groups possibly due to their short residency in the group as reported in baboons 84,88 . Correlations between social networks and gut microbiome similarity have been reported in other wild primates 17,19 , but this study is the first to analyze the impact of social networks on bacterial ASV level.
Ecological determinants of variations in gut bacterial communities. Feeding on flowers, fruits, or leaves, and precipitation correlated to changes in beta diversity and had positive and negative associated taxa with each of them. Consistent with a previous study in these lemurs and other research, feeding on leaves correlated with a higher alpha diversity 22,23,25 . Changes in precipitation had the most associated taxa. Precipitation affects the availability of water sources in the habitat of redfronted lemurs between dry and rainy season 25,33,36 .
During the rainy season redfronted lemurs drink water from temporal puddles, tree holes or the river, whereas www.nature.com/scientificreports/ during the dry season only water ponds in the river remain 35,89 . We speculate that changes in water intake due to reduced water availability may impact the gut microbiome by influencing gut transit times, affecting clearance of microorganisms during excretion, and determining the availability of nutrients and water in the gut habitat 35,90 . Some studies suggest that in humans stool consistency is the strongest predictor of gut microbiome composition and it is relevant as it indicates differences in water availability and activity in the colon influencing the gut niche 90,91 . However, it is also possible that the lemurs ingested bacteria from water sources, and this uptake results in fluctuations in the gut microbiome according to the water sources available 22,89 . The type of food item consumed is another important driver of bacterial community composition as they are also their main energy source 92,93 . The capacity of the gut microbiome to adapt to dietary changes is essential for the acquisition of nutrients from food by the host 8 . This effect was detected when shifting from a diet based on leaves, which is composed of complex polysaccharides, to a diet based on flowers and/or fruits, which is rich in mono-and disaccharides, coinciding with our previous study 25,94 . This impact was detected despite not quantifying precisely the amount of food items consumed, a common limitation of fieldwork studies.

Conclusion
The gut microbiome of wild redfronted lemurs is shaped by group membership, social interactions, fGCM levels, diet, precipitation, and parasite richness at different intensities. Thus, bacterial dispersal processes between hosts and the environment, plus selection by the gut niche through prokaryotic-eukaryotic interactions, changes in water availability, diet fluctuations, and the host's HPA axis activation impact the gut microbiome. Furthermore, we detected an influence of HPA axis activation and parasite richness on bacteria genera important for digestion and energy harvest from diet. Our results demonstrate the importance of longitudinal studies with dense sampling regimes to capture the fluctuations of the gut microbiome as an ecosystem. This approach enabled us to detect the periods when each of the factors impacted the gut microbiome asserting that both processes outside and inside the host influence simultaneously its dynamics.